feat: support local wrangler.toml#113
Conversation
|
Thank you for the PR and idea, your solution works well in development but we also need to think about production too. @pi0 and I discussed and he worked on generating the I think we should instead start by supporting reading the rootDir Then for production, in the This is currently only in the Nitro nightly build |
|
Happy to update your PR to read from the local |
I've just updated the PR to support that.
Is this for another PR? |
I would keep this PR as pending until we can also have the production wrangler generation, otherwise it will break for production once CF will detect a |
EDIT: Instead of using a config object, and to support production, the user wrangler configuration file will be read.
Hello 👋,
Actually, you use the module
nitro-cloudflare-devunder the hood to access to the Wrangler environment API. To setup this module, you create awrangler.tomfile.However, if I want to access to another binding like AI or Email, it's not possible since I do not have any access to the
wrangler.tomlfile.This PR allows to customize the wrangler file.
For example:
nuxt.config.tsWill write the following
wrangler.tomlfile:Then, I can access to the AI binding with the following code:
With a
console.log(globalThis)we got:Without the custom config, the AI binding disapears:
related to #84